﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Abp.Domain.Entities;
using KelonProud.Extensions;

namespace KelonProud.QuickQuery.Domain
{

    [Table("KpQueryCommand")]
    public  class QueryCommand:Entity
    {
        public virtual string Name { get; set; }

        public virtual string Icon { get; set; }

        public virtual string Color { get; set; }

        public virtual string IsOnlyIcon { get; set; }

        public virtual string ActionUrl { get; set; }

        public virtual string Paras { get; set; }

        public virtual string IsNeedConfirm { get; set; }

        public virtual CommandType CommandType { get; set; }

        public virtual int? QueryId { get; set; }

        [ForeignKey("QueryId")]
        public virtual QueryGrid Query { get; set; }

        public virtual int? ColumnId { get; set; }

        [ForeignKey("ColumnId")]
        public virtual QueryGridColumn Column { get; set; }

        [NotMapped]
        public string CommandTypeName => CommandType.GetDisplayName();

        
    }
}
